package com.shujia.test

import java.io.StringReader

import org.wltea.analyzer.core.IKSegmenter

import scala.collection.mutable.ListBuffer

object testIK {
  def main(args: Array[String]): Unit = {
    val str = "数加学院牛逼，瘦瘦的杨老板"
    // 储存分词的结果
    val list = new ListBuffer[String]
    val sr = new StringReader(str)
    val ik = new IKSegmenter(sr, true)
    var next = ik.next()
    while (next != null) {
      val word = next.getLexemeText
      list.append(word)
      next = ik.next()
    }
    println(list.toList)

  }

}
